---
const features = [
  {
    title: "直观的仪表盘",
    description: "通过我们易于使用的仪表盘，一目了然地查看所有关键指标，全面了解您的业务情况。",
    icon: "M9 17V7m0 10a2 2 0 01-2 2H5a2 2 0 01-2-2V7a2 2 0 012-2h2a2 2 0 012 2m0 10a2 2 0 002 2h2a2 2 0 002-2M9 7a2 2 0 012-2h2a2 2 0 012 2m0 10V7m0 10a2 2 0 002 2h2a2 2 0 002-2V7a2 2 0 00-2-2h-2a2 2 0 00-2 2",
    color: "primary"
  },
  {
    title: "高级分析",
    description: "利用我们强大的分析工具，深入了解业务表现，做出数据驱动的决策。",
    icon: "M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z",
    color: "secondary"
  },
  {
    title: "团队协作",
    description: "通过实时协作工具提高生产力，保持团队连接，推动项目向前发展。",
    icon: "M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z",
    color: "accent"
  },
  {
    title: "自动化工作流程",
    description: "通过可定制的自动化流程节省时间，减少错误，简化业务流程。",
    icon: "M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15",
    color: "warning"
  },
  {
    title: "安全数据存储",
    description: "通过企业级安全和合规功能保护您的敏感信息。",
    icon: "M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z",
    color: "primary"
  },
  {
    title: "移动端访问",
    description: "通过针对所有设备优化的全响应式设计，随时随地访问您的工作空间。",
    icon: "M12 18h.01M8 21h8a2 2 0 002-2V5a2 2 0 00-2-2H8a2 2 0 00-2 2v14a2 2 0 002 2z",
    color: "secondary"
  }
];
---

<section id="features" class="section bg-gray-50 dark:bg-gray-800/50">
  <div class="container-custom">
    <div class="text-center max-w-3xl mx-auto mb-16">
      <span class="inline-block px-4 py-1 rounded-full bg-primary-100 dark:bg-primary-900 text-primary-600 dark:text-primary-300 font-medium text-sm mb-4">
        强大功能
      </span>
      <h2 class="mb-6 text-gray-900 dark:text-white">成功所需的一切</h2>
      <p class="text-gray-600 dark:text-gray-300">
        我们的综合平台提供了所有必要的工具，帮助您高效管理、发展和扩展业务。
      </p>
    </div>
    
    <div class="grid md:grid-cols-2 lg:grid-cols-3 gap-8">
      {features.map((feature, index) => (
        <div 
          class="card p-6 border border-gray-200 dark:border-gray-700 slide-up" 
          style={`animation-delay: ${index * 100}ms`}
        >
          <div class={`w-12 h-12 rounded-lg bg-${feature.color}-100 dark:bg-${feature.color}-900/30 flex items-center justify-center mb-6`}>
            <svg 
              class={`w-6 h-6 text-${feature.color}-600 dark:text-${feature.color}-400`} 
              fill="none" 
              stroke="currentColor" 
              viewBox="0 0 24 24" 
              xmlns="http://www.w3.org/2000/svg"
            >
              <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d={feature.icon}></path>
            </svg>
          </div>
          <h3 class="text-xl font-semibold mb-3 text-gray-900 dark:text-white">{feature.title}</h3>
          <p class="text-gray-600 dark:text-gray-300">{feature.description}</p>
        </div>
      ))}
    </div>
    
    <div class="mt-16 text-center">
      <a href="/features" class="btn-primary">
        探索所有功能
        <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 ml-2" viewBox="0 0 20 20" fill="currentColor">
          <path fill-rule="evenodd" d="M10.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L12.586 11H5a1 1 0 110-2h7.586l-2.293-2.293a1 1 0 010-1.414z" clip-rule="evenodd" />
        </svg>
      </a>
    </div>
  </div>
</section>
